﻿@using MsForgeReboot.Web.Extensions
@model PagedList.IPagedList<System.IO.FileInfo>

@{
    ViewBag.Title = "Galerija";
}

<h2>@ViewBag.Title</h2>

<div class="control-group"><div class="controls">
    @Html.ActionLink("Dodaj novu sliku", "Create", null, new { @class = "btn btn-primary"})
</div></div>

@Html.Partial("_PagedView", Model)

    <ul class="thumbnails">
        
        @foreach (var item in Model)
        {
            <li class="span3">
                <div class="thumbnail">
                    <a href="@string.Format("/Content/MediaGallery/{0}", item.Name)">
                        <img src="@string.Format("/Content/MediaGallery/thumbnails/{0}", item.Name)" title="@Path.GetFileNameWithoutExtension(item.Name)" /></a>
                    <div class="control-group"><div class="controls">
                        @Html.ActionLink("Delete", "Delete", new { Area = "ControlPanel" }, new { name = "DeleteLink", data_name = item.Name, @class = "btn" })
                    </div></div>
                </div>
            </li>
        }

    </ul>


<div class="control-group"><div class="controls">
    @Html.ActionLink("Dodaj novu sliku", "Create", null, new { @class = "btn btn-primary"})
</div></div>

<script>
    @section Scripts {
    @Scripts.Render("~/bundles/controlpanel/mediaGallery/index")
}</script>

